<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>rectangle</title>
</head>

<body onload="main()">
    <!--body元素加载完成后执行main()-->
    <canvas id="example" width="400" height="400">

    </canvas>
    <script src="DrawRectangle.js"></script>
</body>

</html>